# 作者：小七
# 2024年12月27日

def homework4():
    print(sum([1, 2, 3]))
    print(sum([x for x in range(101) if x % 2 == 1]))


def homework5():
    for i in range(1, 10):
        for j in range(1, i + 1):
            print('%d*%d=%-2d' % (j, i, i * j), end=" ")
        print()


def homework6():
    s = int(input())
    if s >= 0:
        num = bin(s).count('1')
    else:
        num = 64 - bin(~s).count('1')
    print(num)


def homework6_2():
    s = int(input())
    count = 0
    flag = 1
    while flag < 2 ** 64:
        if s & flag:
            count += 1
        flag <<= 1
    print(count)


if __name__ == '__main__':
    homework4()
    homework5()
    homework6()
    homework6_2()
